import React, { Component } from 'react'
import style from './index.module.scss'
import {back_icon} from '../../common/icon/svg'
export default class Tuijian extends Component {
    state={
        list:[
            {
                url:require("../../common/image/home/swiper01.jpg"),
                path:"",
                collect:1234,
                bid:"",
                msg:"有趣的历史"
            },
            {
                url:require("../../common/image/home/swiper02.jpg"),
                path:"",
                collect:234,
                bid:"",
                msg:"最爱的文学"
            },
            {
                url:require("../../common/image/home/swiper03.jpg"),
                path:"",
                collect:134,
                bid:"",
                msg:"励志的故事"
            }
        ]
    }
    back=()=>{
        this.props.history.push('/home')
    }
    render() {
        return (
            <div className={style.body}>
                <div className={style.head}>
                    <span className={style.back} onClick={this.back}>{back_icon}</span>
                    <span className={style.books}>书单推荐</span>
                </div>
                <div className={style.content}>
                    {
                        this.state.list.map((item,i)=>{
                            return (
                                <div key={i} className={style.list}>
                                    <i className={style.msg}>{item.msg}</i>
                                    <img src={item.url.default}>

                                    </img>
                                    <div className={style.person}>
                                        <div className={style.lianhe}>联合推荐</div>
                                        <span className={style.collect}>{item.collect}人收藏</span>
                                    </div>
                                </div>
                            )
                        })
                    }
                </div>
            </div>
        )
    }
}
